import type { ExtractPropTypes, PropType } from 'vue';
import type { FormFiled } from '@/components/FormPro/props';

export const searchFormProps = {
  modelValue: {
    type: Object as PropType<Record<string, any>>,
    default: () => {
      return {};
    },
  },
  formFiledList: {
    type: Object as PropType<FormFiled[]>,
    default: () => {
      return [];
    },
  },
  labelWidth: {
    type: String as PropType<string>,
    default: '60px',
  },
  hideLabel: {
    type: Boolean as PropType<boolean>,
    default: false,
  },
  showReset: {
    type: Boolean as PropType<boolean>,
    default: false,
  },
  buttonDirection: {
    type: String as PropType<'column' | 'initial' | 'row'>,
    default: 'column',
  },
  showButton: {
    type: Boolean as PropType<boolean>,
    default: true,
  },
  hasExpand: {
    type: Boolean as PropType<boolean>,
    default: false,
  },
  minRows: {
    type: Number as PropType<number>,
    default: 2,
  },
  rootRow: {
    type: Object as PropType<Record<string, any>>,
    default: () => {
      return {};
    },
  },
  showColon: {
    type: Boolean as PropType<boolean>,
    default: true,
  },
  size: {
    type: String as PropType<string>,
    default: 'medium',
  },
  labelAlign: {
    type: String as PropType<string>,
    default: 'right',
  },
};
